package net.minecraft.src;

public class ModelAmmonite extends ModelBase
{
	public ModelAmmonite()
	{
		shell1 = new ModelRenderer(this, 0, 0);
		shell1.addBox(0F, 0F, 0F, 6, 6, 3);
		shell1.setRotationPoint(0F, 17F, 0F);
		shell1.rotateAngleX = 0F;
		shell1.rotateAngleY = 0F;
		shell1.rotateAngleZ = 0F;
		shell1.mirror = false;
		shell2 = new ModelRenderer(this, 0, 6);
		shell2.addBox(0F, 0F, 0F, 3, 3, 1);
		shell2.setRotationPoint(2F, 18.7F, -1F);
		shell2.rotateAngleX = 0F;
		shell2.rotateAngleY = 0F;
		shell2.rotateAngleZ = 0F;
		shell2.mirror = false;
		shell3 = new ModelRenderer(this, 0, 10);
		shell3.addBox(0F, 0F, 0F, 3, 3, 1);
		shell3.setRotationPoint(2F, 18.666667F, 3F);
		shell3.rotateAngleX = 0F;
		shell3.rotateAngleY = 0F;
		shell3.rotateAngleZ = 0F;
		shell3.mirror = false;
		leftTail = new ModelRenderer(this, 0, 15);
		leftTail.addBox(0F, 0F, 0F, 4, 1, 1);
		leftTail.setRotationPoint(6F, 22F, 0F);
		leftTail.rotateAngleX = 0F;
		leftTail.rotateAngleY = 0F;
		leftTail.rotateAngleZ = 0.14871F;
		leftTail.mirror = false;
		middleTail = new ModelRenderer(this, 0, 15);
		middleTail.addBox(0F, 0F, 0F, 4, 1, 1);
		middleTail.setRotationPoint(6F, 21F, 1F);
		middleTail.rotateAngleX = 0F;
		middleTail.rotateAngleY = -0.07436F;
		middleTail.rotateAngleZ = 0.37179F;
		middleTail.mirror = false;
		rightTail = new ModelRenderer(this, 0, 15);
		rightTail.addBox(0F, 0F, 0F, 4, 1, 1);
		rightTail.setRotationPoint(6F, 21.933333F, 2F);
		rightTail.rotateAngleX = 0F;
		rightTail.rotateAngleY = 0F;
		rightTail.rotateAngleZ = -0.22307F;
		rightTail.mirror = false;
		head = new ModelRenderer(this, 10, 9);
        head.addBox(0F, 0F, 0F, 1, 3, 3);
        head.setRotationPoint(6F, 3F, 0F);
	}
	
	public void setLivingAnimations(EntityLiving entityliving, float f, float f1, float f2)
	{
		EntityAmmonite am = (EntityAmmonite) entityliving;
		if(am.tailUpwards)
		{
			if(am.tailMovement++ > 30)
				am.tailUpwards = false;
		}
		else
		{
			if(am.tailMovement-- < 10)
				am.tailUpwards = true;
		}
		leftTail.rotateAngleZ = 0.14871F - 1.25F + (0.05F * am.tailMovement);
		middleTail.rotateAngleZ = 0.37179F - 1.25F + (0.05F * am.tailMovement);
		rightTail.rotateAngleZ = -0.22307F - 1.25F + (0.0575F * am.tailMovement);
	}

	public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5)
	{
		super.render(entity, f, f1, f2, f3, f4, f5);
		setRotationAngles(f, f1, f2, f3, f4, f5);
		shell1.render(f5);
		shell2.render(f5);
		shell3.render(f5);
		leftTail.render(f5);
		middleTail.render(f5);
		rightTail.render(f5);
	}

	public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5)
	{
		super.setRotationAngles(f, f1, f2, f3, f4, f5);
	}

	ModelRenderer shell1;
	ModelRenderer shell2;
	ModelRenderer shell3;
	ModelRenderer leftTail;
	ModelRenderer middleTail;
	ModelRenderer rightTail;
	ModelRenderer head;
}